package cn.smb.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import cn.smb.dao.RoleMapper;
import cn.smb.dao.UserMapper;
import cn.smb.entity.*;
import cn.smb.util.MyBatisUtil;

public class RoleService {
	public static RoleService SERVICE = new RoleService();

	public List<Role> findAll() {
		SqlSession s = MyBatisUtil.getSession();

		try {
			RoleMapper m = s.getMapper(RoleMapper.class);

			return m.findALL();
		} finally {
			MyBatisUtil.close(s);
		}

	}
}
